<template>
  <web-view :src="url"></web-view>
</template>

<script>
  import { getDetail } from '@/api/workTicket/index.js'
  
  export default {
    data() {
      return {
        url: ''
      }
    },
    onLoad(options) {
      if(options.id) this.getDetailInfo({id: options.id})
    },
    methods: {
      getDetailInfo: function(params) {
        getDetail(params).then(res => {
          this.url = res.pdfUrl
        }).catch(err => console.warn(err))
      }
    }
  }
</script>

<style>
</style>